QuickTime has always provided many support mechanisms for importing media from other formats into QuickTime movies, as well as exporting from QuickTime movies to other media formats. Importing and exporting are handled by movie data exchange components.
You write import and export components to allow a user to perform importing and exporting, respectively. Your component provides a routine that presents a dialog box for the user to change options. For an import component, you need to implement MovieImportDoUserDialog ; for an export component, you must implement MovieExportDoUserDialog . For example, the text import component presents a dialog box with options for setting the font, size, and style of the text media it will add to the movie. The WAVE audio export component presents the standard sound compression dialog box, so that sample rate and sample size can be specified for the generated WAVE file.
In the past, when a user made a change to the configuration of a component in a settings dialog box, those changes would be lost when the component was closed. With QuickTime 3, it is now possible to retrieve the current settings from the still-open import or export component. In addition, you can restore a component's current settings to previously-retrieved settings. The restoration does not involve any user interface. This may be advantageous for application developers who want to provide preferences for the last settings used or want to perform batch importing or exporting, using previously-established settings.
QuickTime now makes it possible for your application to retrieve and store the settings of import and export components without having to present the user with a user interface, such as a settings dialog box, to accomplish the task.
Two scenarios illustrate how saved settings can be useful. In the first scenario, an application presents an importer or exporter component's configuration dialog the first time that component is used and then saves the settings so they can be restored without the user having to go fill out the configuration dialog again. In another scenario, an application might use settings to implement preset configurations that the user often wants.
QuickTime 4 adds the ability for movie export components to associate resources that hold one or more named presets for that exporter. The dialog accessible through ConvertMovieToFile automatically builds a menu of all presets for the currently selected exporter allowing a user to export without having to go through the exporter's custom dialog.
With QuickTime 4, it is also possible to include component resources that serve as named presets to be used with the export component. These resources include the same kind of settings just described. See "Movie Exporter Presets" .
For information about using the new save-and-restore component settings mechanism, refer to the section "Implementing Movie Data Exchange Components" .
| Previous | Chapter Contents | Chapter Top | Next |